package com.zh.business.service.web.common;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.zh.zhbootcommon.entity.common.CommonCode;

/**
 * <p>
 * 数据字典表 服务类
 * </p>
 *
 * @author JueDream
 * @since 2021-08-24
 */
public interface IDCommonCodeService extends IService<CommonCode> {

    /**
     * 查询分页
     * @param page
     * @param limit
     * @param type
     * @param codeName
     * @return
     */
    Page<CommonCode> queryCodeList(Integer page, Integer limit, String type, String codeName);

    /**
     * 新增
     * @param commonCode
     * @return
     */
    Integer insert(CommonCode commonCode);

    /**
     * 删除
     * @param cId
     * @return
     */
    boolean deleteChild(Integer cId);

    /**
     * 根据Code对象查询
     * @param commonCode
     * @return
     */
    CommonCode  getCommonCode(CommonCode commonCode);

    /**
     * 根据Code查询
     * @param cCode
     * @return
     */
    CommonCode  getCommonCodeByCode(Integer cCode);

}
